{extend name="../../admin/view/main"}

{block name="button"}
<!--{if auth("add")}-->
<button class='layui-btn layui-btn-sm layui-btn-primary' data-modal='{:url("add")}' data-title="添加奖品">添加奖品</button>
<!--{/if}-->
<!--{if auth("remove")}-->
<button class='layui-btn layui-btn-sm layui-btn-primary' data-action='{:url("remove")}' data-rule="id#{key}">删除奖品</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card">

    <div class="layui-tab-content">
        {include file='turntable_prizes/index_search'}
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='nowrap'>奖品名称</th>
                <th class='nowrap'>奖励的金币</th>
                <th class='nowrap'>概率</th>
                <th class='nowrap'>状态</th>
                <th class='nowrap'>创建时间</th>
                <th class='nowrap'>操作</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
                </td>
                <td>{$vo.title}</td>
                <td>{$vo.money}</td>
                <td class="nowrap">{$vo.probability}</td>
                <td>{$vo.status}</td>
                <td>{$vo.create_time}</td>

                <td>
                    <!--{if auth("turntable/add")}-->
                    <a class="layui-btn layui-btn-sm" data-modal="{:url('edit')}?id={$vo.id}" data-title="编辑">编辑</a>
                    <!--{/if}-->

                    <!--{if auth("remove")}-->
                    <a class="layui-btn layui-btn-xs layui-btn-danger" data-action="{:url('remove')}" data-confirm="确定要移入回收站吗？" data-value="id#{$vo.id}">删 除</a>
                    <!--{/if}-->
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>
{/block}
